<template>
  <div>
    <div class="top_div">{{title}}</div>
    <div class="bottom_div">
      <div>
        <span>{{subtitle}}</span>
        <span class="energy_value">{{energy_value}}</span>
        <span>{{units}}</span>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: { // 接收父控件传递的参数
    title: {
      type: String,
      default: ''
    },
    subtitle: {
      type: String,
      default: ''
    },
    energy_value: {
      type: Number,
      default: 0
    },
    units: {
      type: String,
      default: ''
    }
  },
  data () {
    return {

    }
  }
}
</script>

<style lang="less" scoped>
  .top_div {
    width: 310px;
    color: #000;
    height: 25px;
    line-height: 25px;
    text-align: center;
    background-color: #6F93FF;
  }

  .bottom_div {
    width: 310px;
    font-size: 14px;
    height: 25px;
    text-align: center;
    line-height: 25px;
    color: #6849FF;
    background-color: #ffffff99;
  }

  .energy_value {
    color: #000;
    font-size: 14px;
  }

</style>
